Filters for Alert System |
|
Process Platform provides a set of filters or consumers that can be configured in the manner as specified below. Apart from these, you can configure your own filters and consumers.
Filters are set on alert messages in order to enrich or modify them. Alert System provides the following filters for Process Platform:
- Message ID Filter
- Severity Filter
Message ID Filter
This filter ignores or allows alerts with ID's specified in the configuration file. For example, if you want to allow only a set of alerts to pass through, the configuration should be as follows:
<category name="com.eibus.management.AlertSystem"> <priority value="info"/> <appender-ref ref="processNamefile"/> </category> <appender class="com.eibus.util.logger.appender.ProcessNamedDailyRollingFileAppender" name="processNamefile"> <param name="File" value="%N.xml"/> <param name="DatePattern" value="&apos;.&apos;yyyy-MM-dd"/> <layout class="org.apache.log4j.xml.XMLLayout"/> <filter class="com.eibus.util.logger.filter.ResourceIDFilter"> <param name="patterns" value="fully qualified message Bundle ID; fully qualified message ID"/> </filter> </appender>
The alert messages for the Message ID's 'message Bundle ID1' and 'message ID1' will be published. All other alert messages will be ignored.
Example for the 'fully qualified messageID' is 'Cordys.ESBServer.Messages.monitorStarted', where 'Cordys.ESBServer.Messages' represents the 'fully qualified MessageBundleID' and 'monitorStarted' is for the actual 'MessageID'. For more information on messageID's refer to Alert Repository.
However, you can also block(deny) a set of alert messages while allowing the others to filter through. The configuration should be as follows:
<category name="com.eibus.management.AlertSystem"> <priority value="info"/> <appender-ref ref="processNamefile"/> <appender-ref ref="e-mail"/> </category> <appender class="com.eibus.util.logger.appender.ProcessNamedDailyRollingFileAppender" name="processNamefile"> <param name="File" value="%N.xml"/> <param name="DatePattern" value="&apos;.&apos;yyyy-MM-dd"/> <layout class="org.apache.log4j.xml.XMLLayout"/> <filter class="com.eibus.util.logger.filter.ResourceIDFilter"> <param name="patterns" value="message ID1; message ID2"/> <param name="filterMode" value="DENY"/> </filter> </appender>
- In <param> node , the attribute 'name' value is either 'filterMode' or 'patterns'.
- The possible values for the 'value' attribute in the 'filterMode' are DENY, NEUTRAL or ACCEPT.
DENY : The log event is dropped immediately without consulting with the remaining filters.
NEUTRAL : The next filter in the chain is consulted. If there are no more filters in the chain, then the log event is logged. Thus, in the presence of no filters, the default behavior is to log all logging events.
ACCEPT : The log event is logged without consulting the remaining filters.
Severity Filter
The purpose of severity filter is to filter alerts that are less severe to the severity level configured. Each alert is assigned a severity level. These severity levels are predefined and cannot be changed by the user. Alerts can fall into one of the following three levels of severity:
- Error
- Warn
- Info
The default severity level of an alert is Info. Ex: <priority value='info'/>